import React, { useContext } from 'react'
import myContext from '../usecontext.js'
import { Table } from 'antd';




export default function Memory(props) {
  const seaver = useContext(myContext);

  const { sys } = seaver
  const columns = [
    {
      dataIndex: 'name',
      key: 'name',
    },
    {
      dataIndex: 'value',
      key: 'value',
    },
    {
      dataIndex: 'sys',
      key: 'value',
    },
    {
      dataIndex: 'system',
      key: 'value',
    }
  ]
  const data = [
    {
      key: '1',
      name: '服务器名称',
      value: sys.computerName,
      sys: '操作系统',
      system: sys.osName
    },
    {
      key: '2',
      name: '服务器IP',
      value: sys.computerIp,
      sys: '系统架构',
      system: sys.osArch
    },
  ]
  return (
    <Table bordered={true} showHeader={false} pagination={false} columns={columns} dataSource={data} />
  )
}
